Common-code cleanups, for ia64.
Signed-off-by: keir.fraser@cl.cam.ac.uk
3ddb79c3NiyQE2vQnyGiaBnNjBO1rA xen/include/asm-x86/spinlock.h
40e1966akOHWvvunCED7x3HPv35QvQ xen/include/asm-x86/string.h
3ddb79c3ezddh34MdelJpa5tNR00Dw xen/include/asm-x86/system.h
+42033fc1Bb8ffTshBYFGouGkiAMoUQ xen/include/asm-x86/time.h
3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h
40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h
41c0c412k6GHYF3cJtDdw37ee3TVaw xen/include/asm-x86/vmx.h
}
break;
+ case DOM0_GETMEMLIST:
+ {
+ int i;
+ struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
+ unsigned long max_pfns = op->u.getmemlist.max_pfns;
+ unsigned long pfn;
+ unsigned long *buffer = op->u.getmemlist.buffer;
+ struct list_head *list_ent;
+
+ ret = -EINVAL;
+ if ( d != NULL )
+ {
+ ret = 0;
+
+ spin_lock(&d->page_alloc_lock);
+ list_ent = d->page_list.next;
+ for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
+ {
+ pfn = list_entry(list_ent, struct pfn_info, list) -
+ frame_table;
+ if ( put_user(pfn, buffer) )
+ {
+ ret = -EFAULT;
+ break;
+ }
+ buffer++;
+ list_ent = frame_table[pfn].list.next;
+ }
+ spin_unlock(&d->page_alloc_lock);
+
+ op->u.getmemlist.num_pfns = i;
+ copy_to_user(u_dom0_op, op, sizeof(*op));
+
+ put_domain(d);
+ }
+ }
+ break;
+
default:
ret = -ENOSYS;
OBJS := $(subst dom_mem_ops.o,,$(OBJS))
OBJS := $(subst grant_table.o,,$(OBJS))
OBJS := $(subst page_alloc.o,,$(OBJS))
+OBJS := $(subst physdev.o,,$(OBJS))
OBJS := $(subst slab.o,,$(OBJS))
endif
}
break;
- case DOM0_GETMEMLIST:
- {
- int i;
- struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
- unsigned long max_pfns = op->u.getmemlist.max_pfns;
- unsigned long pfn;
- unsigned long *buffer = op->u.getmemlist.buffer;
- struct list_head *list_ent;
-
- ret = -EINVAL;
- if ( d != NULL )
- {
- ret = 0;
-
- spin_lock(&d->page_alloc_lock);
- list_ent = d->page_list.next;
- for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
- {
- pfn = list_entry(list_ent, struct pfn_info, list) -
- frame_table;
- if ( put_user(pfn, buffer) )
- {
- ret = -EFAULT;
- break;
- }
- buffer++;
- list_ent = frame_table[pfn].list.next;
- }
- spin_unlock(&d->page_alloc_lock);
-
- op->u.getmemlist.num_pfns = i;
- copy_to_user(u_dom0_op, op, sizeof(*op));
-
- put_domain(d);
- }
- }
- break;
-
case DOM0_GETDOMAININFO:
{
full_execution_context_t *c;
#include <asm/mm.h>
/* opt_console: comma-separated list of console outputs. */
-static unsigned char opt_console[30] = "com1,vga";
+static unsigned char opt_console[30] = OPT_CONSOLE_STR;
string_param("console", opt_console);
/* opt_conswitch: a character pair controlling console switching. */
goto fail;
}
+#ifndef NO_UART_CONFIG_OK
if ( !UART_ENABLED(&com[handle]) )
{
printk("ERROR: cannot use unconfigured serial port COM%d\n", handle+1);
return -1;
}
+#endif
if ( conf[4] == 'H' )
handle |= SERHND_HI;
#define HZ 100
+#define OPT_CONSOLE_STR "com1,vga"
+
/*
* Just to keep compiler happy.
* NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!!
--- /dev/null
+
+#ifndef __X86_TIME_H__
+#define __X86_TIME_H__
+
+/* nothing */
+
+#endif /* __X86_TIME_H__ */
u64 pfn_to_mfn_frame_list;
} PACKED arch_shared_info_t;
+typedef struct {
+} PACKED arch_vcpu_info_t;
+
#define ARCH_HAS_FAST_TRAP
#endif
u64 pfn_to_mfn_frame_list;
} PACKED arch_shared_info_t;
+typedef struct {
+} PACKED arch_vcpu_info_t;
+
#endif /* !__ASSEMBLY__ */
#endif
* Per-VCPU information goes here. This will be cleaned up more when Xen
* actually supports multi-VCPU guests.
*/
-typedef struct vcpu_info_st
+typedef struct
{
/*
* 'evtchn_upcall_pending' is written non-zero by Xen to indicate
* an upcall activation. The mask is cleared when the VCPU requests
* to block: this avoids wakeup-waiting races.
*/
- u8 evtchn_upcall_pending;
- u8 evtchn_upcall_mask;
+ u8 evtchn_upcall_pending; /* 0 */
+ u8 evtchn_upcall_mask; /* 1 */
u8 pad0, pad1;
u32 evtchn_pending_sel; /* 4 */
-} PACKED vcpu_info_t; /* 8 */
+ arch_vcpu_info_t arch; /* 8 */
+} PACKED vcpu_info_t; /* 8 + arch */
/*
* Xen/guestos shared data -- pointer provided in start_info.
#ifndef __XEN_KEYHANDLER_H__
#define __XEN_KEYHANDLER_H__
-struct xen_regs;
+#include <asm/regs.h>
/*
* Register a callback function for key @key. The callback occurs in
#include <xen/types.h>
#include <public/xen.h>
+#include <asm/time.h>
extern int init_xen_time();